/*
* @Author: An
* @Date:   2017-07-12 11:41:05
* @Last Modified by:   An
* @Last Modified time: 2017-07-14 11:40:35
*/

'use strict';
var _xj = require('util/xj.js');

var _product = {
	// 获取商品列表
	getProductList : function(listParam, resolve, reject) {
		_xj.request({
			url 	: _xj.getServerUrl('/product/list.do'),
			method	: 'POST',
			data 	: listParam,
			success : resolve,
			error 	: reject
		});
	},
	// 获取商品详情
	getProductDetail : function(productId, resolve, reject) {
		_xj.request({
			url 	: _xj.getServerUrl('/product/detail.do'),
			method	: 'POST',
			data 	: {
				productId : productId
			},
			success : resolve,
			error 	: reject
		});
	}
}
module.exports = _product;